<?php
$this->breadcrumbs = array(
    UserModule::t('Admin') => array('/admin/default/index'),
    UserModule::t('Các thông tin mới'),
);
$this->menu = array(
    array('label' => 'Default users', 'url' => array('/user/defaultUser/index')),
    array('label' => 'Suppliers', 'url' => array('/user/supplier/index')),
    array('label' => 'Transporters', 'url' => array('/user/transporter/index')),
    array('label' => 'Category', 'url' => array('/admin/category/index')),
    array('label' => 'Package', 'url' => array('/admin/buildTree/admin')),
    array('label' => 'Help', 'url' => array('')),
    array('label' => 'Font End', 'url' => array('')),
);
// import the extension
?>

<h1><?php echo UserModule::t("Nhà cung cấp mới đăng kí tài khoản trên hệ thống ( " . $sup_new . " )");
User::lightBoxAddUser(User::S_SUPPLIER); ?></h1>
<?php
if ($sup_new != 0) {
    $this->widget('zii.widgets.grid.CGridView', array(
        'dataProvider' => $sups->search(),
        //'filter'=>User::model(),
        'columns' => array(
            array(
                'name' => 'username',
                'type' => 'raw',
                'value' => 'CHtml::link(CHtml::encode($data->username),"index.php?r=user/admin/view&id=".$data->id."?iframe=true",array("class"=>"view","rel"=>"prettyPhoto"))',
            ),
            array(
                'name' => 'full_name',
                'type' => 'raw',
                'value' => '$data->full_name',
            ),
            array(
                'name' => 'email',
                'type' => 'raw',
                'value' => 'CHtml::link(CHtml::encode($data->email), "mailto:".$data->email)',
            ),
            array(
                'name' => 'phone',
                'type' => 'raw',
                'value' => '$data->phone',
            ),
            array(
                'name' => 'createtime',
                'value' => 'date("d.m.Y ",$data->createtime)',
            ),
            array(
                'name' => 'lastvisit',
                'value' => '(($data->lastvisit)?date("d.m.Y ",$data->lastvisit):UserModule::t("Not visited"))',
            ),
//		array(
//			'name'=>'superuser',
//			'value'=>'User::itemAlias("UserType",$data->superuser)',
//		),
            array(
                'class' => 'CButtonColumn',
                'template' => '{view}',
                'buttons' => array(
                    'view' => array(
                        'url' => '"index.php?r=user/admin/view&id=".$data->id."?iframe=true"',
                        // 'click' => "function(){ $('#viewTab').load($(this).attr('href'));return false; }"
                        'options' => array(
                            // 'rel'=>'prettyPhoto',
                            'title' => '',
                            'class' => 'view'
                        ),
                    ),
                    'update' => array(
                        'url' => '"index.php?r=user/admin/update&id=".$data->id."?iframe=true"',
                        'options' => array(
                            //'rel'=>'abc',
                            'title' => '',
                            'class' => 'update'
                        ),
                    )
                ),
            ),
        ),
    ));
}
?>

<h1><?php echo UserModule::t("Các đơn vị vận chuyển mới đăng kí tài khoản trên hệ thống ( " . $tran_new . " )"); ?></h1>
<?php
if ($tran_new != 0) {
    $this->widget('zii.widgets.grid.CGridView', array(
        'dataProvider' => $trans->search(),
        //'filter'=>User::model(),
        'columns' => array(
            array(
                'name' => 'username',
                'type' => 'raw',
                'value' => 'CHtml::link(CHtml::encode($data->username),"index.php?r=user/admin/view&id=".$data->id."?iframe=true",array("class"=>"view","rel"=>"prettyPhoto"))',
            ),
            array(
                'name' => 'full_name',
                'type' => 'raw',
                'value' => '$data->full_name',
            ),
            array(
                'name' => 'email',
                'type' => 'raw',
                'value' => 'CHtml::link(CHtml::encode($data->email), "mailto:".$data->email)',
            ),
            array(
                'name' => 'phone',
                'type' => 'raw',
                'value' => '$data->phone',
            ),
            array(
                'name' => 'createtime',
                'value' => 'date("d.m.Y ",$data->createtime)',
            ),
            array(
                'name' => 'lastvisit',
                'value' => '(($data->lastvisit)?date("d.m.Y ",$data->lastvisit):UserModule::t("Not visited"))',
            ),
//		array(
//			'name'=>'superuser',
//			'value'=>'User::itemAlias("UserType",$data->superuser)',
//		),
            array(
                'class' => 'CButtonColumn',
                'template' => '{view}',
                'buttons' => array(
                    'view' => array(
                        'url' => '"index.php?r=user/admin/view&id=".$data->id."?iframe=true"',
                        // 'click' => "function(){ $('#viewTab').load($(this).attr('href'));return false; }"
                        'options' => array(
                            // 'rel'=>'prettyPhoto',
                            'title' => '',
                            'class' => 'view'
                        ),
                    ),
                    'update' => array(
                        'url' => '"index.php?r=user/admin/update&id=".$data->id."?iframe=true"',
                        'options' => array(
                            //'rel'=>'abc',
                            'title' => '',
                            'class' => 'update'
                        ),
                    )
                ),
            ),
        ),
    ));
}
?>
